package inventory.entity.po;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import inventory.entity.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author ttxxi
 * @create 2019-11-23
 * @description 用户所有信息，包含user表的所有信息，repository表对应该用户的信息，permissionRecordPo表的对应该用户的信息
 */
public class UserPo {

    //原user表基本字段
    @TableId
    private String userId;
    private String workId;
    private String sex;
    private Integer age;
    private Date signIn;
    private String roleId;
    private String pid;
    private String password;
    private String salt;
    private String username;
    private String status;


    //role表
    private String role;
    private String state;

    //用户仓库list
    @TableField(exist = false)
    private List<Repository> repositoryList;
    //用户权限list
    @TableField(exist = false)
    private List<PermissionRecordPo> permissionRecordPoList;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getWorkId() {
        return workId;
    }

    public void setWorkId(String workId) {
        this.workId = workId;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getSignIn() {
        return signIn;
    }

    public void setSignIn(Date signIn) {
        this.signIn = signIn;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<Repository> getRepositoryList() {
        return repositoryList;
    }

    public void setRepositoryList(List<Repository> repositoryList) {
        this.repositoryList = repositoryList;
    }

    public List<PermissionRecordPo> getPermissionRecordPoList() {
        return permissionRecordPoList;
    }

    public void setPermissionRecordPoList(List<PermissionRecordPo> permissionRecordPoList) {
        this.permissionRecordPoList = permissionRecordPoList;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "UserPo{" +
                "userId='" + userId + '\'' +
                ", workId='" + workId + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", signIn=" + signIn +
                ", roleId='" + roleId + '\'' +
                ", pid='" + pid + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", username='" + username + '\'' +
                ", status='" + status + '\'' +
                ", role='" + role + '\'' +
                ", state='" + state + '\'' +
                ", repositoryList=" + repositoryList +
                ", permissionRecordPoList=" + permissionRecordPoList +
                '}';
    }
}
